﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Linq;
using System.Xml.Linq;

public partial class eduExamEnd : System.Web.UI.Page
{
    DataClassesDataContext SMSDC = new DataClassesDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            var a = (from b in SMSDC.StaffsInCourses
                     where b.CourseID == Convert.ToInt32(Request.QueryString["CourseID"]) && b.StaffID == ((from c in SMSDC.StaffInfos where c.staffName == "" + Membership.GetUser().ToString() + "" select c.StaffID).Single())
                    select b.ExamState).Single();
            this.Label1.Text = a.ToString();
        }
    }
}
